package de.toolschmied.jjas.client.cms;

import com.google.gwt.user.client.ui.Widget;

import de.toolschmied.jjas.shared.Content;
import de.toolschmied.jjas.shared.ContentType;
import de.toolschmied.jjas.shared.TextContent;

public class ViewFactory {

	public static Widget getView(Content content) {
		ContentType contentType = content.getContentType();
		
		switch(contentType) {
		case IMAGE:
			return getImageView(content);
		case MENU:
			return getMenuView(content);
		case TEXT:
			return getTextView((TextContent) content);
		default:
			throw new IllegalArgumentException("Unknown Content Type: " + contentType);
		}
	}
	
	public static ImageView getImageView(Content content) {
		return null;
	}
	
	public static MenuView getMenuView(Content content) {
		return null;
	}
	
	public static TextView getTextView(TextContent content) {
		return new TextView(content);
	}
	
}
